/**
 * Copyright (C) 2018-2019
 * All rights reserved, Designed By www.joolun.com
 * 注意：
 * 本软件为www.joolun.com开发研制，未经购买不得使用
 * 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 * 一经发现盗用、分享等行为，将追究法律责任，后果自负
 */
export const tableOption = {
    dialogDrag: true,
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    menuType: 'text',
    searchShow: true,
    excelBtn: true,
    printBtn: true,
    viewBtn: false,
    editBtn:true,
    addBtn:false,
    searchMenuSpan: 6,
    column: [
       {
            label: '卡号',
            prop: 'cardNo',
            sortable: true,
         search: true,
         addDisplay: false,
         editDisplay: false,
            rules: [
                                ]
        },
        {
            label: '用户id',
            prop: 'userId',
            hide:true,
            sortable: true,
          display: false,
          addDisplay: false,
          editDisplay: false,
            rules: [
                                ]
        },
      {
        label: '用户姓名',
        search: true,
        prop: 'name',
        sortable: false,
        editDisplay: false,
        rules: [{
          required: true,
          message: '请输入用户姓名',
          trigger: 'blur'
        }]
      },
      {
        label: '性别',
        prop: 'sex',
        editDisplay: false,
        type: 'radio',
        sortable: true,
        dicData: [{
          label: '男',
          value: '1'
        }, {
          label: '女',
          value: '2'
        }],
        rules: [{
          required: true,
          message: '请选择性别',
          trigger: 'blur'
        }]
      },
      {
        label: '手机号',
        search: true,
        editDisplay: false,
        prop: 'phone',
        sortable: true,
        rules: [{
          required: true,
          message: '请输入手机号'
        },{
          min: 11,
          max: 11,
          message: '长度在 11 个字符',
          trigger: 'blur'
        }]
      },
      {
        label: "身份证号",
        prop: "idCard",
        editDisplay: false,
        search: true,
        sortable: true,
        type: 'number',
        rules: [{
          required: true,
          message: '不能为空'
        }],
      },
      {
        label: '商品类目',
        editDisplay: false,
        prop: 'cardType',
        type: 'cascader',
        search: true,
        sortable: true,
        props: {
          label: 'name',
          value: 'id'
        },
        dicUrl: '/mall/goodscategory/tree',
      },
      {
        label: '商品名',
        prop: 'goodsName',
        search: true,
        editDisplay: false,
        type: 'cascader',
        sortable: true,
        props: {
          label: 'name',
          value: 'name'
        },
        rules: [{
          required: true,
          message: '请选择商品名',
          trigger: 'blur'
        }],
        dicUrl: '/mall/goodsspu/list',
      },
      {
        label: '规格',
        prop: 'specifications',
        search: true,
        editDisplay: false,
        type: 'cascader',
        sortable: true,
        props: {
          label: 'name',
          value: 'name'
        },
        rules: [{
          required: true,
          message: '请选择规格',
          trigger: 'blur'
        }],
        dicUrl: '/mall/goodsspecvalue/tree',
      },
      {
        label: '状态',
        prop: 'status',
        search: true,
        addDisplay:false,
        editDisplay: false,
        type: 'radio',
        sortable: true,
        rules: [{
          required: true,
          message: '请选择状态',
          trigger: 'blur'
        }],
        dicData: [{
          label: '使用中',
          value: '0'
        }, {
          label: '已过期',
          value: '1'
        }]
      },
            {
            label: '激活时间',
            prop: 'activationTime',
              editDisplay: false,
            sortable: true,
              type: 'date',
              valueFormat: 'yyyy-MM-dd HH:mm:ss',
              rules: [{
                required: true,
                message: '请选择激活时间',
                trigger: 'blur'
              }],
        },
            {
            label: '过期时间',
            prop: 'overTime',
              editDisplay: false,
              type: 'date',
              valueFormat: 'yyyy-MM-dd HH:mm:ss',
            sortable: true,
              rules: [{
                required: true,
                message: '请选择过期时间',
                trigger: 'blur'
              }],
        },
            {
            label: '次数',
              addDisplay: false,
              editDisplay: false,
            prop: 'activation',
            sortable: true,
            rules: [
                                ]
        },
      {
        label: '订单编号',
        addDisplay: false,
        prop: 'orderNo',
        editDisplay: false,
        sortable: true,
        rules: [
        ]
      },

      {
        label: "入会费",
        prop: "price",
        editDisplay: false,
        type: 'number',
        rules: [{
          required: true,
          message: '不能为空'
        }],
      },
      {
        label: "付款渠道",
        search: true,
        editDisplay: false,
        prop: "priceChannel",
        type: 'select',
        dicData: [{
          label: '现金',
          value: '0'
        }, {
          label: '刷卡',
          value: '1'
        }, {
          label: '商城',
          value: '2'
        }, {
          label: '其他',
          value: '3'
        }]
      },
      {
        label: '备注',
        prop: 'remark',
        search: true,
        type: 'textarea',
        sortable: true,

      },


    ]
}
